package chapter09;

import java.util.concurrent.LinkedBlockingQueue;

public class LinkedBlockingQueueTest {
    public static void main(String[] args) throws InterruptedException {
        // 可做消费者和生产者的队列，当对列为空时消费者必须等待，当队列满时生产者必须等待
        LinkedBlockingQueue<Integer> queue = new LinkedBlockingQueue<>(1);
        queue.poll();
        queue.put(1);
        queue.put(2);


    }
}
